package com.winit.agent.model;


import com.winit.common.base.bean.BaseModel;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@DynamicUpdate
@DynamicInsert
@Table(name = "ucloud_agent")
@NoArgsConstructor
public class UCloudAgent extends BaseModel {

    @Id
    @GenericGenerator(name = "idGenerator", strategy = "uuid")
    @GeneratedValue(generator = "idGenerator")
    private String id;

    @Column(name = "node")
    private String node;

    @Column(name = "project")
    private String project;

    @Column(name = "purpose")
    private String purpose;

    @Column(name = "occupy")
    private Integer occupy;

    @Column(name = "start_time")
    private Date startTime;

    @Column(name = "end_time")
    private Date endTime;

    @Column(name = "status")
    private String status;

}
